package com.jun.serviceimpl;

import com.jun.entity.Cookie;
import com.jun.mapper.CookieMapper;
import com.jun.service.CookieService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class CookieServiceImpl implements CookieService {
    @Autowired
    CookieMapper cookieMapper;
    @Override
    public int insertCookie(Cookie cookie) {
        return cookieMapper.insertCookie(cookie);
    }

    @Override
    public int deleteCookie() {
        return cookieMapper.deleteCookie();
    }

    @Override
    public int updateCookie(Cookie cookie) {
        return cookieMapper.updateCookie(cookie);
    }

    @Override
    public Cookie searchCookie() {
        return cookieMapper.searchCookie();
    }

    @Override
    public Cookie searchCookieByMac(String mac) {
        return cookieMapper.searchCookieByMac(mac);
    }

    @Override
    public int deleteCookieByMac(String mac) {
        return cookieMapper.deleteCookieByMac(mac);
    }
}
